<template>
  <div class="category">
    <page-search :search-config="searchConfig"></page-search>
    <page-content
      ref="contentRef"
      @new-click="handleNewClick"
      @edit-click="handleEditClick"
      :content-config="contentCofig"
    />
    <page-modal ref="modalRef" :modal-config="modalConfig"></page-modal>
  </div>
</template>

<script setup lang="ts">
import usePageContent from "@/hooks/usePageContent"
import usePageModal from "@/hooks/usePageModal"

import pageSearch from "@/components/page-search/page-search.vue"
import searchConfig from "./config/search.config"

import pageContent from "@/components/page-content/page-content.vue"
import contentCofig from "./config/content.config"

import pageModal from "@/components/page-modal/page-modal.vue"
import modalConfig from "./config/modal.config"

//使用hooks
const { contentRef, handleQueryClick, handleResetClick } = usePageContent()
//点击modal
const { modalRef, handleNewClick, handleEditClick } = usePageModal()
</script>
<style scoped lang="less">
</style>
